//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "DPCnsDsp.h"
#include "DPGrfDsp.h"
#include "RLCnsDsp.h"
#include "DModule.h"

//---------------------------------------------------------------------------
#pragma package( smart_init )
#pragma link "DialPad"
#pragma link "PHDS"
#pragma link "DIALPAD"
#pragma resource "*.dfm"
TDPCnsDsp1*  DPCnsDsp1;

//---------------------------------------------------------------------------
__fastcall TDPCnsDsp1::TDPCnsDsp1( TComponent*  Owner ) : TDiPad( Owner )
{
  PHDS1->Tabela = DM->TBGeral;
}

//---------------------------------------------------------------------------
void __fastcall TDPCnsDsp1::BitBtn4Click( TObject*  Sender )
{
  try
   {
    DPGrfDsp1 = new TDPGrfDsp1( NULL );
    DPGrfDsp1->ShowModal();
   }

  __finally
   {
    delete DPGrfDsp1;
   }
}

//---------------------------------------------------------------------------
void __fastcall TDPCnsDsp1::BitBtn3Click( TObject*  Sender )
{
  TPedeRel1*  PR;
  TRLCnsDsp1*  RLCnsDsp1 = new TRLCnsDsp1( NULL );
  try
   {
    PR = new TPedeRel1( NULL );
    PR->Report = RLCnsDsp1->PHReport1;
    PR->ShowModal();
   }

  __finally
   {
    Close();
    delete RLCnsDsp1;
    delete PR;
   }

}

//---------------------------------------------------------------------------
void __fastcall TDPCnsDsp1::BitBtn2Click( TObject*  Sender )
{
  Close();
}

//---------------------------------------------------------------------------


